<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="en">
<head th:replace="layout/adminLayout :: htmlhead(title='BabyLog Edit Blog')"></head>
<body class="am-with-topbar-fixed-top am-scrollable-vertical">

<div th:replace="layout/adminLayout :: header"></div>

<div class="am-cf admin-main">
    <!-- sidebar start -->
    <div th:replace="layout/adminLayout :: sidebar"></div>
    <!-- sidebar end -->

    <!-- content start -->
    <div class="admin-content">
        <div class="admin-content-body">

            <div class="am-cf am-padding am-padding-bottom-0">
                <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">Blog</strong> /
                    <small>Edit Blog</small>
                </div>
            </div>
            <hr>

            <div class="am-g am-g-fixed adduser">


                <form class="am-form am-form-horizontal" th:action="@{/admin/blog/updBlog}">
                    <div class="am-form-group ">
                        <label for="baby_id" class="am-u-sm-3 am-form-label">宝贝 / Baby</label>
                        <div class="am-u-sm-9 am-radio">
                            <label><input type="radio" name="baby_id" id="baby_id" th:value="${blog.baby.getId()}"
                                          checked="checked" th:text="${blog.baby.getName()}"></label>
                        </div>
                    </div>

                    <div class="am-form-group">
                        <label for="first" class="am-u-sm-3 am-form-label">第一次 / First</label>
                        <div class="am-u-sm-9">
                            <input type="text" id="first" name="first" placeholder="第一次做过的事..."
                                   th:value="${blog.first}">

                        </div>
                    </div>

                    <div class="am-form-group">
                        <label for="language" class="am-u-sm-3 am-form-label">语言 / Language</label>
                        <div class="am-u-sm-9">
                            <input type="text" id="language" name="language" placeholder="学过的语言..."
                                   th:value="${blog.language}">

                        </div>
                    </div>

                    <div class="am-form-group">
                        <label for="cognitive" class="am-u-sm-3 am-form-label">认知 / Cognitive</label>
                        <div class="am-u-sm-9">
                            <input type="text" id="cognitive" name="cognitive" placeholder="认知了新的事物..."
                                   th:value="${blog.cognitive}">

                        </div>
                    </div>


                    <div class="am-form-group">
                        <label for="blog" class="am-u-sm-3 am-form-label">日志 / Blog</label>
                        <div class="am-u-sm-9">
                            <textarea class="" rows="5" id="blog" name="blog" placeholder="几十个字符记录那天孩子发生过的事情..."
                                      th:text="${blog.blog}"></textarea>

                        </div>
                    </div>

                    <input type="hidden" name="id" th:value="${blog.id}">
                    <input type="hidden" name="user_id" th:value="${session.user.getId()}"/>
                    <div class="am-form-group">
                        <div class="am-u-sm-9 am-u-sm-push-3">
                            <button type="submit" class="am-btn am-btn-primary">提交修改</button>
                        </div>
                    </div>

                </form>

            </div>


        </div>
        <!-- footer-->
        <div th:replace="layout/adminLayout :: footer"></div>
    </div>


</div>
<!-- content end -->


</div>


</body>
</html>